package com.mls.education.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mls.common.annotation.Excel;
import com.mls.common.core.domain.BaseEntity;

/**
 * 用户信息对象 edu_user
 * 
 * @author 管理员
 * @date 2022-02-19
 */
public class EduUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户ID */
    private Integer id;

    /** 用户昵称 */
    @Excel(name = "用户昵称")
    private String username;

    /** 登录密码 */
    private String password;

    /** 头像 */
    @Excel(name = "头像")
    private String photo;

    /** 密码盐 */
    private String salt;

    /** 性别 */
    @Excel(name = "性别")
    private Integer gender;

    /** 出生日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date birth;

    /** 邮箱 */
    @Excel(name = "邮箱")
    private String email;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    /** 用户角色 */
    @Excel(name = "用户角色")
    private Integer role;

    private String token;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }
    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }
    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }
    public void setPhoto(String photo) 
    {
        this.photo = photo;
    }

    public String getPhoto() 
    {
        return photo;
    }
    public void setSalt(String salt) 
    {
        this.salt = salt;
    }

    public String getSalt() 
    {
        return salt;
    }
    public void setGender(Integer gender) 
    {
        this.gender = gender;
    }

    public Integer getGender() 
    {
        return gender;
    }
    public void setBirth(Date birth) 
    {
        this.birth = birth;
    }

    public Date getBirth() 
    {
        return birth;
    }
    public void setEmail(String email) 
    {
        this.email = email;
    }

    public String getEmail() 
    {
        return email;
    }
    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }
    public void setRole(Integer role) 
    {
        this.role = role;
    }

    public Integer getRole() 
    {
        return role;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("username", getUsername())
            .append("password", getPassword())
            .append("photo", getPhoto())
            .append("salt", getSalt())
            .append("gender", getGender())
            .append("birth", getBirth())
            .append("email", getEmail())
            .append("phone", getPhone())
            .append("role", getRole())
            .append("token", getToken())
            .toString();
    }
}
